<template>
  <div class="my_picker">
    <van-picker
      show-toolbar
      :title="title"
      :columns="columns"
      @cancel="$listeners.onCancel"
      @confirm="$listeners.onConfirm"
      :default-index="defaultIndex"
    ></van-picker>
  </div>
</template>

<script>
export default {
  name: 'mypicker',
  props: {
    defaultIndex: {
      type: Number,
      default: 1
    },
    title: {
      type: String
    }
  },
  data() {
    return { columns: ['男', '女'] }
  }
}
</script>

<style scoped></style>
